package com.zju.DoctorGo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.math.BigDecimal;


@Data
@TableName("medicine")
public class Medicine {
    @TableId(value = "medicineId", type = IdType.AUTO)
    private Long medicineId;
    private String image;
    private String medicineName;
    private String medicineNumber;
    private String notes;
    private BigDecimal unitPrice;

//    public Medicine(MedicineDTO medicineDTO) {
//        this.medicineId = medicineDTO.getMedicineId();
//        this.image = medicineDTO.getImage();
//        this.medicineName = medicineDTO.getMedicineName();
//        this.medicineNumber = medicineDTO.getMedicineNumber();
//        this.notes = medicineDTO.getNotes();
//        this.unitPrice = medicineDTO.getUnitPrice();
//        // 假设MedicineDTO中没有timestamp和paymentStatus等属性
//        // 如果有，也可以在这里进行相应的初始化
//    }
}